package com.duoduo.demo.springboot.dao;

import javax.annotation.PostConstruct;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.support.JdbcDaoSupport;
import org.springframework.stereotype.Repository;

/**
 * Dao基类
 * @author chengesheng@gmail.com
 * @date 2017年10月23日下午3:08:55
 */
@Repository
public class BaseDao extends JdbcDaoSupport {

	protected Logger logger = LoggerFactory.getLogger(getClass());

	@Autowired
	private JdbcTemplate jdbcTemplate;

	@PostConstruct
	public void initJdbcTemplate() {
		super.setJdbcTemplate(jdbcTemplate);
	}
}
